
package com.gameai.tickettoride.core;

import static playn.core.PlayN.*;
import playn.core.GroupLayer;
import playn.core.Image;
import playn.core.ImageLayer;


/**
 * Abstract description of a card.
 * 
 * @author Christopher
 */
public class TrainCard extends Card {
    
    //card types as string 0-9
    private String[] types = {"wild", "red", "pink", "orange", "yellow", "green", "blue", "black", "white"};
    
    //gray = wild
   
    
    private Graph.COLOR color;
    /**
     * Create a new Card.
     * 
     * @param val
     */
    
    public TrainCard(int val){
        super(val);
        
        switch(val) {
            case 0:
                color = Graph.COLOR.gray;
                IMAGE = assets().getImage("images/wildCar.png");
                break;
            case 1:
                color = Graph.COLOR.red;
                IMAGE = assets().getImage("images/redCar.png");
                break;
            case 2:
                color = Graph.COLOR.pink;
                IMAGE = assets().getImage("images/pinkCar.png");
                break;
            case 3:
                color = Graph.COLOR.orange;
                IMAGE = assets().getImage("images/orangeCar.png");
                break;
            case 4:
                color = Graph.COLOR.yellow;
                IMAGE = assets().getImage("images/yellowCar.png");
                break;
            case 5:
                color = Graph.COLOR.green;
                IMAGE = assets().getImage("images/greenCar.png");
                break;
            case 6:
                color = Graph.COLOR.blue;
                IMAGE = assets().getImage("images/blueCar.png");
                break;
            case 7:
                color = Graph.COLOR.black;
                IMAGE = assets().getImage("images/blackCar.png");
                break;
            case 8:
                color = Graph.COLOR.white;
                IMAGE = assets().getImage("images/whiteCar.png");
                break;
        }
    }
    
    public Graph.COLOR getCardColor() {
        return color;
    }
    
    @Override
    public String toString() {
        return color.toString();
    }
    
}
